Skip to content

Instantly share code, notes, and snippets.

@kalaspuffar
kalaspuffar / stable-diffusion-docker.md
Created July 17, 2023 13:28
stable-diffusion-docker.md
@edokeh
edokeh / index.js
Last active May 11, 2024 16:43
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@alivarzeshi
alivarzeshi / Standardize_Arabic_Characters.sql
Last active May 11, 2024 16:41
The code updates textual columns in a SQL Server database to standardize specific Arabic characters across all tables.
USE [SQLdmRepository];
GO
-- Declare variables to store the names of the table and column currently being processed.
DECLARE @TableName NVARCHAR(MAX);
DECLARE @ColumnName NVARCHAR(MAX);
-- Declare a cursor to iterate over all textual columns in the database.
-- This cursor selects the name of the table and column from the system catalog views.
-- Only user tables (xtype = 'U') and specific textual column types are considered.

Exploiting Lua 5.1 on x86_64

The following Lua program generates a Lua bytecode program called lua-sandbox-rce.luac, which in turn spawns a shell from within Lua 5.1 sandbox. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.

function outer()
  local magic -- In bytecode, the stack slot corresponding to this local is changed
  local function middle()
    local co, upval
    local ub1 = {[0] = -- Convert uint8_t to char[1]
@martasskv5
martasskv5 / CompleteDiscordQuest.md
Created April 26, 2024 16:37 — forked from aamiaa/CompleteDiscordQuest.md
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@bmaupin
bmaupin / free-database-hosting.md
Last active May 11, 2024 16:40
Free database hosting
@spehj
spehj / file_pick.js
Last active May 11, 2024 16:38
NiceGUI Custom file picker. It's based on Quasar QFile. I created this because the uploader does not fit in my design and I needed something simple.
export default {
template: `
<q-file
v-model="file"
@update:modelValue="file_pick"
:label="label"
:multiple="multiple"
:accept="accept"
/>
`,
@brianclements
brianclements / Commit Formatting.md
Last active May 11, 2024 16:38
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@lalitmee
lalitmee / settings.lua
Created March 29, 2021 10:59
nvim settings
local fn = vim.fn
local api = vim.api
local executable = function(e)
return fn.executable(e) > 0
end
local opts_info = vim.api.nvim_get_all_options_info()
local opt = setmetatable(
{}, {
@LifeJustDLC
LifeJustDLC / content.js
Created May 11, 2024 14:22
Global Speed for Android interaction design PoC
"use strict";
;
(function main() {
let truePlayRate = 1.0;
let trueCurrentTime = NaN;
const speedList = [0.8, 1.0, 1.25, 1.5, 2.0];
const isFrefox = navigator.userAgent.indexOf("Firefox") === -1 ? false : true;
const isEdge = navigator.userAgent.indexOf("EdgA") === -1 ? false : true; // yeah it's "EdgA"
let player;
const playerSize = { width: NaN, height: NaN };